package com.letoken.platform.repo.wallet.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * Web3区块链配置信息
 * </p>
 *
 * @author 作者
 * @since 2023-01-11
 */
@Getter
@Setter
@TableName("web3_chain_provider")
@ApiModel(value = "Web3ChainProvider对象", description = "Web3区块链配置信息")
public class Web3ChainProvider extends Model<Web3ChainProvider> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("编号")
      @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("类型（evm/btc/tron)")
    @TableField("type")
    private String type;

    @ApiModelProperty("网络名称(bsc/eth)")
    @TableField("network")
    private String network;

    @ApiModelProperty("网络编号")
    @TableField("network_id")
    private String networkId;

    @ApiModelProperty("网络类型")
    @TableField("network_type")
    private String networkType;

    @ApiModelProperty("网络节点")
    @TableField("endpoint")
    private String endpoint;

    @ApiModelProperty("Gwei")
    @TableField("gas_limit")
    private String gasLimit;

    @ApiModelProperty("Gwei")
    @TableField("gas_price")
    private String gasPrice;

    @ApiModelProperty("浏览器API")
    @TableField("api_url")
    private String apiUrl;

    @ApiModelProperty("浏览器APIKEY")
    @TableField("api_key")
    private String apiKey;

    @ApiModelProperty("是否使用代理")
    @TableField("proxy")
    private Boolean proxy;

    @ApiModelProperty("代理URL")
    @TableField("proxy_url")
    private String proxyUrl;

    @ApiModelProperty("MoralisChainID")
    @TableField("moralis_chain")
    private String moralisChain;

    @ApiModelProperty("区块高度")
    @TableField("block_heigh")
    private Long blockHeigh;

    @ApiModelProperty("MoralisAPIKey")
    @TableField("moralis_apikey")
    private String moralisApikey;

    @ApiModelProperty("出块时间（毫秒）")
    @TableField("block_duration")
    private Integer blockDuration;

    @ApiModelProperty("转账确认区块数量")
    @TableField("transfer_confirms")
    private Integer transferConfirms;

    @ApiModelProperty("转Gas区块确认数量")
    @TableField("transfer_gas_confirms")
    private Integer transferGasConfirms;

    @ApiModelProperty("更新日期")
    @TableField("update_date")
    private LocalDateTime updateDate;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
